package com.fs.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@Accessors(chain = true)
@TableName("user")
public class User  implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type= IdType.AUTO)
    private Integer id;

    private String username;//用户名

    private String password;//密码

    private String salt;//盐

    private String phone;//电话

    private String email;//邮箱

    private Boolean status;//状态

    private Integer balance;//余额

    private Integer score;//积分

    private Integer errNum;//错误登录次数

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date errTime;//错误登录时间

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date created;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date updated;

    @TableField(exist = false)
    private UserInfo userInfoEntity;

}